projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00b7c14
)
(read-number): Catch errors.
author
Richard M. Stallman
<rms@gnu.org>
Sun, 22 Apr 2007 16:56:19 +0000
(16:56 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sun, 22 Apr 2007 16:56:19 +0000
(16:56 +0000)
lisp/subr.el
patch
|
blob
|
history
diff --git
a/lisp/subr.el
b/lisp/subr.el
index fac2398a7954db05a3706d89d897f313a191885c..a05c1d1578002f60d6fd6d754c5ab5f942f9f59b 100644
(file)
--- a/
lisp/subr.el
+++ b/
lisp/subr.el
@@
-1735,9
+1735,11
@@
The value of DEFAULT is inserted into PROMPT."
(let ((str (read-from-minibuffer prompt nil nil nil nil
(and default
(number-to-string default)))))
- (setq n (cond
- ((zerop (length str)) default)
- ((stringp str) (read str)))))
+ (condition-case nil
+ (setq n (cond
+ ((zerop (length str)) default)
+ ((stringp str) (read str))))
+ (error nil)))
(unless (numberp n)
(message "Please enter a number.")
(sit-for 1)